iT邦幫忙

0

使用Chrome的開發人員工具來練習JS

  • 分享至 

  • xImage
  •  

首先,將Chrome瀏覽器打開,點擊右上角的三個點點 → 更多工具 → 開發人員工具

https://ithelp.ithome.com.tw/upload/images/20230919/20153016bw4ceSoUFp.jpg

https://ithelp.ithome.com.tw/upload/images/20230919/20153016JPfUmo1fYC.jpg

快速鍵

滑鼠按右鍵,點擊 檢查,又或是 Key-in:
https://ithelp.ithome.com.tw/upload/images/20230919/20153016uuEqUzp5bc.png

點擊 Console 就可以編輯 JS Coding

若是想要把頁面資訊清空,可以點擊圖示中的 Clear console
https://ithelp.ithome.com.tw/upload/images/20230919/20153016jOXE3PZp3L.png

現在,輸入 alert('Hello World'); 就會立即出現彈跳視窗
https://ithelp.ithome.com.tw/upload/images/20230919/20153016JYgRE2owRH.jpg

https://ithelp.ithome.com.tw/upload/images/20230919/20153016LF9tDR4BqS.jpg

差別就是,它沒有儲存功能喔~~~
單純練手用的,Chrome 是一個很好用的 debug 工具


.

尚未有邦友留言

立即登入留言